package com.talkyun.utils.test;


public class StringReplace {

    public static void main(String[] args) {
        String text = " <html>"
                + "<head> "
                + "<title> Console </title>"
                + "<body>"
                + "${data}"
                + "</body>"
                + "</html>";

        String html = null;
        long t = System.currentTimeMillis();
        for (int i = 0; i < 10000; i++) {
            html = text.replace("${data}", "var data = {kk:1,vv:2}");
        }
        System.out.println("" + (System.currentTimeMillis() - t));
        System.out.println(html);
    }
}
